//
//  DataDownloader.h
//  DataDownloader
//
//  Created by Brennan Stehling on 10/23/09.
//  Copyright 2009 SmallSharpTools LLC. All rights reserved.
//

#import <Foundation/Foundation.h>


// declaration of an optional method for a delegate
@protocol DataDownloadWorker
@optional
- (void) downloadFinished: (NSString *) str;
- (void) downloadFailed: (NSString *) str;
@end

@interface DataDownloader : NSObject {
    NSURLConnection *           _connection;
	NSMutableString *			_mutableString;
	id							_delegate;

}

@property (nonatomic, readonly) BOOL				isReceiving;
@property (nonatomic, retain)   NSURLConnection *	connection;
@property (nonatomic, retain)   NSMutableString *	mutableString;
@property (nonatomic, retain)	id					delegate;

- (void)downloadData:(NSString *)urlStr delegate:(id)delegate;

@end
